package dudghk;

import java.util.Scanner;

public class J05Ex31CreditCaed {
	// 신용카드 종류, 은행정보출력

	public static void main(String[] args) {
		// 1.변수 선언
		int mycard=0;
		int cardno1=0; int cardno2=0;
		
		String result = "";
		Scanner sc = null;

		// 숫자입력 및 정보 조회
		System.out.println("신용카드번호를 입렵하세요");
		sc = new Scanner(System.in);
		mycard = sc.nextInt();

	cardno1=mycard/10000; //둘째 자리까지
	cardno2=mycard/100000; //첫째자리
	
	if(cardno1==35){
		switch (mycard) {
		case 356317:
			result = "JCB- NH농협카드";
			break;
		case 356901:
			result = "JCB-신환카드";
			break;
		case 356912:
			result = "JCB-신환카드";
			break;
				default:
			result = "잘못된 카드번호!";
		}
	}else if(cardno2==4){
		switch(mycard){
		case 404825:
		result="비자카드-비씨카드";
		break;
		}
	}
		// 결과출력
	/*	System.out.println(mycard);
		System.out.println(mycard/10);
		System.out.println(mycard/100);
		System.out.println(mycard/1000);
		System.out.println(mycard/10000);
		System.out.println(mycard/100000);*/
		System.out.println(result);

		
		
		
		sc.close();
	}

}
